<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <title>File Upload</title>
    </h:head>
    <h:body>
        <h1>Traditional File Upload</h1>

        <h:form>
            <h:commandButton value="Ajax File Upload" action="ajax-upload"/><p/>
        </h:form>

        Pick a text file:
        <h:form enctype="multipart/form-data">
            <h:inputFile value="#{fileUploadBean.file}"/><br/>

            <h:commandButton value="Upload"/><p/>

            <h2>File Contents:</h2>
            <h:outputText value="#{fileUploadBean.text}"/>
        </h:form>
    </h:body>
</html>

